home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk5 / mostra / mostra.doc / mostra.doc
Text File  |  1995-03-18  |  17KB  |  374 lines

  1.  
  2.  
  3.  
  4.                                 Mostra 1.06
  5.  
  6.                            A Universal IFF Viewer
  7.  
  8.                      © 1990,1991,1992 Sebastiano Vigna
  9.  
  10.  
  11. There are many utilities for viewing IFF ILBM files, but none I'd seen until
  12. now met the goal of displaying every IFF picture; each had its
  13. idiosyncrasies. If one viewer could display overscan pictures, then every
  14. picture with more than 640 pixels on a line would be shifted like there were
  15. 700 pixels; some programs could only show a directory of pictures by forcing
  16. the user to enter all the filenames; some programs would crash with PAL
  17. pictures; others would do the same with pictures larger than any screen; it
  18. was rare to have an option to force a screen mode (for the tech-folks out
  19. there: old IFF ILBM files don't have the CAMG chunk!); there were no
  20. comfortable file requesters for use when you didn't know the exact name of
  21. the file (who can remember GRABBiT file names?); pressing the right mouse
  22. button could cause a useless drag bar to corrupt the picture...
  23.  
  24. If a program had one feature, it lacked another, so I decided to write a
  25. show utility. I never would have succeeded without the best friend of an
  26. Amiga programmer: the ARP library. If I have been able to write Mostra, it's
  27. only to ARP's credit. Pattern matching, resource tracking, powerful resident
  28. functions... The only drawback is that you MUST have the arp.library (V39!)
  29. in your libs: directory in order to run Mostra. Otherwise, a message will be
  30. displayed, and Mostra will refuse to run. However, the next release of
  31. Mostra will work only under Release 2 and will not need arp.library. Mostra
  32. is a pure program, i.e., it can be made resident.
  33.  
  34. Note that you can run Mostra from Workbench: called by itself it will pop
  35. the file requester and will show you pictures until you select CANCEL or
  36. close the file requester window. Otherwise, you can select multiple icons,
  37. or you can change the default tool of your pictures. Note that if you do
  38. this with an IFF CAT or LIST you will have an automatic little slideshow.
  39.  
  40. Mostra can process *any* IFF ILBM file; this means not only IFF ILBM FORMs,
  41. but also nested ILBM, FTXT, FORMs, CATs, LISTs and PROPs!  It will always
  42. try to find the screen type that fits the best, and won't give up if you
  43. want to see 1x1 brushes or VERY large pictures: Tom tried up to 5120x4096
  44. (thanks Tom). In any case, you can force the screen type with several
  45. options.
  46.  
  47. One of the major features in this release is support for multi-palette
  48. pictures, i.e., pictures with the new PCHG chunk which should substitute the
  49. old CTBL and SHAM chunks. See the Changes.doc file for additional
  50. informations. SHAM is still supported, but the support of CTBL pictures via
  51. external call has been dropped since it was shown to be unreliable.
  52.  
  53.  
  54. To get the syntax in AmigaDOS style type:
  55.  
  56.      M ?
  57.  
  58. This will produce the input template:
  59.  
  60.      Files/...,A=All/S,R=Repeat/S,Q=Quiet/S,NoFastDraw/S,
  61.      C=Center/S,B=BlackBackground/S,W=Width/K,H=Height/K,Cycle/S,
  62.      Secs/K,Fade/K,NO=NoStartup/S,Batch/K,LockPic/S,
  63.      N=NoMouse/S,F=FreeMouse/S,LockKeys/S,NA=NoActivate/S,DB=DoubleBuffering/S,
  64.      Hires/S,Lace/S,Lores/S,NoLace/S,HAM/S,Halfbrite/S
  65.  
  66. If you ask for more help by typing "?" again, you will see:
  67.  
  68.      Mostra 1.06 © 1990,1991,1992 Sebastiano Vigna
  69.      Usage: M <wildcards [...] | !> [All] [Repeat] [Quiet] [NoFastDraw]
  70.      [Center] [BlackBackground] [Width n] [Height n] [Cycle]
  71.      [Secs time] [Fade speed] [NoStartup] [Batch file] [LockPic]
  72.      [NoMouse] [FreeMouse] [LockKeys] [NoActivate] [DoubleBuffering]
  73.      [Hires | Lores] [Lace | NoLace] [HAM | Halfbrite]
  74.  
  75. The same help is displayed if you call Mostra with no arguments.
  76.  
  77. Mostra's first argument is a list of patterns (or file names) as long as you
  78. want; you will get every picture whose name matches one of the patterns.
  79.  
  80. Alternatively, you can type only the "!" character, and Mostra will display
  81. the famous Heath File Requester, allowing you to scan the entire file system.
  82.  
  83. When you're tired of looking at the picture, move the mouse pointer to the
  84. very top of the screen and press the right button (you can also press the
  85. RETURN, SPACE or ESCAPE keys). You can drag or depth- arrange the screen
  86. with the left mouse button (the gadgets are invisible, but they really are
  87. there!). TAB will toggle on/off color cycling. To stop pattern matching or
  88. IFF scanning use CTRL-C at any moment.
  89.  
  90. If the screen size is less than the size of the picture, you can move around
  91. with cursor keys by themselves (moving by 8 pixels) or in combination with
  92. the SHIFT (a screenful minus 16 pixels), ALT (which brings you to the
  93. borders) or CTRL (16 pixels) keys. A noteworthy feature of Mostra is that
  94. the picture is NOT decrunched all at one time in a very large chunk of
  95. memory; instead, a fast ML routine decrunches the file in real-time every
  96. time you move (the routine could be faster, but it has lots of controls to
  97. get rid of damaged IFF BODY chunks; safety always first). This is not as
  98. fast as the memory-eating method, but I think it's MUCH better!  Very large
  99. pictures (like 800x900) will be shown in a full screen (generated on the fly
  100. at Workbench size) which you can move around. Overscan pictures will retain
  101. their size of it's not greater than 362x283 lo-res pixels (362x241 on a NTSC
  102. Amiga). For hi-res pictures, there is also a 704 pixel width limit due to
  103. Intuition (724 under Release 2). Small brushes will be shown in a minimum
  104. 256x128 pixel screen. Of course, moving vertically with multi-palette
  105. pictures involves a high system overhead, since CopperLists are continuously
  106. built and deleted.
  107.  
  108. A weird effect of this method is that you can see pictures that can't even
  109. be *LOADED* into your Amiga. Let's suppose you have a really crunched
  110. picture; the BODY chunk and a 256x256 lo-res screen could take much less
  111. space than the decrunched picture, so you could create pictures that only
  112. Mostra could let you see in all of their parts. Why you would want to do
  113. this, well, that's another matter.
  114.  
  115.  
  116. Then we have a lot of options (parentheses show how to shorten 'em):
  117.  
  118.  -  ALL (A) recursively scans all of the subdirectories during the
  119.     wildcard search.
  120.  
  121.  -  REPEAT (R) will endlessly restart from the first pattern when it
  122.     has finished with the last; if you used the "!" line arguments,
  123.     the file requester will pop up after every picture until you
  124.     CANCEL or close.
  125.  
  126.  -  QUIET (Q) turns off all messages except in case of error.
  127.  
  128.  -  NOFASTDRAW leaves the program at priority 0; by default, Mostra
  129.     will surround the BODY decrunching operations with a
  130.     SetTaskPri(1). This will not lock the system, but in a
  131.     multitasking situation Mostra will perform quickly when needed.
  132.  
  133.  -  CENTER (C) will force the screen to be centered (640x200 pictures
  134.     on PAL screens look so ugly...) and will use overscan if
  135.     necessary.
  136.  
  137.  -  BLACKBACKGROUND (B) will create a 0-bitplane (almost no memory
  138.     consumed!) black screen that will stay until you saw the last
  139.     picture. This is for aesthetic purposes only.
  140.  
  141.  -  WIDTH and HEIGHT (W,H) want an argument that specifies the
  142.     dimensions of the viewing screen. However, Mostra is an
  143.     intelligent program, and will almost always find the correct
  144.     screen by itself. WARNING: dimensions allowed are from 64 to
  145.     1024, at your own risk. Your Amiga won't crash, but weird things
  146.     can happen...
  147.  
  148.  -  CYCLE will automatically activate color cycling on every picture.
  149.     Usually this happens only by request, through TAB.
  150.  
  151.  -  SECS must be followed by a number between 0 and 1000 (the zero
  152.     delay was a request from a BIXen). Mostra will display the
  153.     picture for the number of seconds specified, but you can skip it
  154.     with mouse, RETURN, SPACE, and ESCAPE keys as always or stop the
  155.     show with CTRL-C. Cursor keys are disabled. Greatly reworked on
  156.     Warren's request.
  157.  
  158.  -  FADE lets you specify a speed for pictures to FADE in and out.
  159.     Valid numbers are 1 to 4, with four the slowest. Note that HAM
  160.     pictures can't be faded.
  161.  
  162.  -  NOMOUSE (N) will hide the mouse pointer while Mostra is displaying
  163.     a picture.
  164.  
  165.  -  FREEMOUSE (F) will let you pass from one picture to another by
  166.     clicking either of the mouse buttons at any position on the
  167.     screen.
  168.  
  169.  -  LOCKKEYS will discard any input from the keyboard during the
  170.     display. You must use the mouse to pass to the following picture.
  171.     Note that if FREEMOUSE is not activated, the only way to go is
  172.     clicking the right mouse button while the mouse pointer is at the top
  173.     of the screen.
  174.  
  175.  -  LOCKPIC will lock the picture displayed. You won't be able to
  176.     scroll around, but the memory in which the file is loaded will be
  177.     immediately freed after the decompression, thus minimizing the memory
  178.     usage.
  179.  
  180.  -  NOACTIVATE (NA) will inhibit the activation of the picture
  181.     screens, so you can keep on typing on your current screen. This
  182.     was a request from Tom.
  183.  
  184.  -  DOUBLEBUFFERING (DB) sets a double buffering show mode: while a
  185.     new picture is being loaded you see the old one, no Workbench
  186.     pop-up or black screens. Eats lots of memory, too. Again, a
  187.     request from Tom. (Note: it's canceled if you call the file
  188.     requester.)
  189.  
  190. Centering is no longer performed via Preferences, so if you move the screen
  191. the centering will go away. NOSTARTUP and BATCH options will be discussed
  192. later.
  193.  
  194. Now, the graphics options. You can force all screens to be HIRES or LORES,
  195. LACE or NOLACE, HAM or HALFBRITE. Note that if Mostra finds a six bitplane
  196. picture with no indications (no CAMG chunk), it won't set the HAM flag by
  197. default. These flags are "dumb," that is, they'll do exactly what you say,
  198. even if it is meaningless. However, if you use both HALFBRITE and HAM
  199. together, only the former will take place.
  200.  
  201. And now, some examples:
  202.  
  203.  
  204. M MyPics:* SECS 5 FADE 1 NOMOUSE BLACKBACKGROUND REPEAT CENTER ALL
  205.  
  206. will generate a real (and endless!) slide show of the pictures in the
  207. MyPics: dir and in all its subdirs, centered and with no mouse pointer
  208. hanging around. In order to stop the slide show, you must press CTRL-C.
  209.  
  210.  
  211. M df0:*.image df0:pictures/*.pic HIRES LACE
  212.  
  213. will show the files ending with .image on the drive df0: and the files
  214. ending with .pic in the directory df0:pictures. Mostra will be forced to use
  215. high resolution, interlaced screens. Setting the HIRES flag on pictures with
  216. more than 4 bitplanes usually leads you to see absolutely nothing.
  217.  
  218.  
  219. M dh0:hirespic LORES NOLACE
  220.  
  221. will show a hi-res picture in lo-res ("zooming in"). You can move around
  222. with the cursor keys as described above.
  223.  
  224. WIDTH and HEIGHT can be useful when you have a picture that cannot be
  225. displayed because there's not enough Chip RAM (you get the "Can't open
  226. Screen" error message). In such a case, try:
  227.  
  228.  
  229. M pic WIDTH 128 HEIGHT 128
  230.  
  231. This will usually allow you to at least get a peek at something.
  232.  
  233.  
  234.  
  235.  
  236.                           Advanced features
  237.  
  238. For maximum flexibility, Mostra allows you to use "startup" files and
  239. "startup" ToolTypes, with which you can configure the program to suit your
  240. tastes.
  241.  
  242. There is a standard startup file, called S:Startup-Mostra. Mostra will
  243. search for it when run from CLI. The format of this file is *EXACTLY* the
  244. same as the Mostra line format minus the command name ("M"). Commands may be
  245. spread out over several lines or gathered together onto a single line. Every
  246. switch or keyword in the startup file will act as a default, and will be
  247. toggled or superseded by any command line arguments. Command line switches
  248. will act as toggles (if your startup file has the keyword ALL and you say "M
  249. * ALL", you *WON'T* go into subdirectories), while keywords simply assert
  250. the new value (if you have "fade 1" in your startup file and you say "fade
  251. 3" in the command line, your pictures will be faded at speed 3).
  252.  
  253. Two options concern startup files:
  254.  
  255.  -  NOSTARTUP inhibit the search for startup files, useful if you have
  256.     one of them and you want to specify your options from scratch; it
  257.     can be shortened with "NO".
  258.  
  259.  -  BATCH wants a complete path/filename that Mostra will use as
  260.     startup file.
  261.  
  262. From the WB side, you can write the startup options in the ToolTypes of the
  263. Mostra icon, and it will use them. The format is the same of Startup-Mostra.
  264. Please note that "FADE=1", "WIDTH=352" are valid, but "FREEMOUSE=ON" is not;
  265. use only "FREEMOUSE".
  266.  
  267. Or you can set the first ToolType of a project icon to STARTUP and put your
  268. options in the following lines; the project picture file will be shown with
  269. those options when you double-click its icon. You can do the same thing with
  270. an icon that has no related file, and put some wildcards in the ToolType.
  271. The wildcards will then be shown with those options. If you don't put in
  272. wildcards, you get a "style" icon: you can SHIFT click some icons, SHIFT
  273. click the "style" icon (in *THIS* order) and then SHIFT double-click the
  274. Mostra icon (or directly SHIFT double-click the last icon, if its default
  275. tool is Mostra): you will see the selected picture files with the options
  276. specified in the style icon. The style icon by itself will pop up the file
  277. requester. Please note that even an icon with wildcards can be used as a
  278. style icon because multiple selections supersede wildcards.
  279.  
  280. I know, it seems a little twisted, but using it you'll find, instead, that
  281. it's the way you'd think.
  282.  
  283. WARNING: strange interactions can take place. If you have some picture
  284. icons, and you SHIFT click all but one of them and then you SHIFT double
  285. click the last *AND* the last picture icon you clicked had some STARTUP
  286. options, you will see *ALL* of the pictures with those options. Right?
  287.  
  288. For curious/tech/interested people, here is the exact algorithm:
  289.  
  290. 1) If sm_NumArgs > 1 (the user started Mostra with al least an icon
  291. argument), check if sm_ArgList[1] (the first "real" argument) has ToolTypes
  292. with first ToolType = "STARTUP". If so, scan the whole ToolTypes list like a
  293. command line, accepting mixed commands on a single ToolType as well as
  294. separated commands in separated ToolTypes.
  295.  
  296. 2) If 1) goes wrong, check the Mostra icon ToolTypes, and take them as a
  297. command line. (Note: STARTUP is not requested.)
  298.  
  299. 3) Now, if sm_NumArgs > 1, check every sc_ArgList[i] with i>0 and if there
  300. is a related file (*NOT* a .info file!) generate a list of arguments as if
  301. the user entered them manually, *SUPERSEDING* eventual filenames/wildcards
  302. found in 1) and 2).
  303.  
  304. Now, examples, by means of common problems:
  305.  
  306.  
  307. 1) "I have a hundred pictures on my 360M hard disk, and I've organized them
  308. in a few groups. How can I make simple slideshows, with each group separate?"
  309.  
  310. Simple: Create a project icon for each group, and add a ToolType "STARTUP".
  311. Then add a ToolType like "PICS:Group1/* ALL SECS 5 CENTER" to choose your
  312. options, set the default tool to "C:M" (or wherever you put it) and
  313. double-click (of course, this must be done with every group icon). DON'T
  314. give the icons the same name as a directory, or Mostra will collapse in
  315. confusion.
  316.  
  317.  
  318. 2) "I want to always see the black screen when I start from WB."
  319.  
  320. Set a Mostra ToolType to "BLACKBACKGROUND".
  321.  
  322.  
  323. 3) "I have some pictures. Sometimes I want to see a few of them with a full
  324. screen and no mouse, sometimes with a 128x128 screen, sometimes centered."
  325.  
  326. Create three "style" icons. Each icon must have as its first ToolType
  327. "STARTUP", and the following ones must be something like "NOMOUSE", "WIDTH
  328. 128 HEIGHT 128" and "CENTER". The default tool must be "C:M". When you want
  329. to see in a certain style, SHIFT click the picture icons and *THEN* SHIFT
  330. double-click the style icon you desire.
  331.  
  332.  
  333. 4) "I'd like to click my pics one at a time, each one with different
  334. options. I'd like also to see them in irregular groups, each picture with
  335. its options."
  336.  
  337. You need a psycho-analyst, not Mostra.
  338.  
  339.  
  340.  
  341.                               Acknowledgments
  342.  
  343. I wish to thank some people, first of all the ARP team for the arp.library
  344. and the SAS team for the best Amiga C compiler. Speed and compactness of
  345. Mostra come from the fabulous 5.10b release. Also I would like to thank the
  346. people that encouraged me someway or helped me to find bugs, in particular
  347. Warren Block, Tom Rokicki, Christopher A. Wichura and Loren Wilton.
  348.  
  349. If you have access to a TeX system, you can print a copy of the TeX
  350. "Mostra.tex" file that comes with the program. Anyway, if you spent a good
  351. part of your time preparing and printing documents, I'd suggest you to take
  352. a look at AmigaTeX, a wonderful package from Radical Eye Software which is
  353. probably the best implementation of TeX you can find on any computer.
  354.  
  355. Mostra is © 1990,1991,1992 Sebastiano Vigna and it's freely distributable as
  356. long as all of its files are included in their original form without
  357. additions, deletions, or modifications of any kind, and only a nominal fee
  358. is charged for its distribution. This software is provided "AS IS" without
  359. warranty of any kind, either expressed or implied. By using Mostra, you
  360. agree to accept the entire risk as to the quality and performance of the
  361. program.
  362.  
  363. Comments, complaints, desiderata are welcome.
  364.  
  365.  
  366.     Sebastiano Vigna
  367.     Via Valparaiso 18
  368.     I-20144 Milano MI
  369.  
  370.     BIX: svigna
  371.     UUCP:seba%sebamiga@cbmita.uucp
  372.          ...{uunet|pyramid|rutgers}!cbmvax!cbmehq!cbmita!sebamiga!seba
  373.     FIDO: 2:331/301.6 (aka 2:21301/6 Sebastiano Vigna@f301.n331.z2.fidonet.org)
  374.